
var AJAX = function(){
	this.timeout = 180000;// 3 minute
	this.getUnAsync = function(url,data){
		var resposne = null;
		$.ajax({
			   type: "GET",
			   async:false,// 同步的
			   timeout: this.timeout, 
			   url: url,
			   data: data,
			   success: function(resv){
				   resposne = resv;
			   }
		});
		return resposne;
	};
	
	this.postUnAsyncFormData = function(url,data){
		var resposne = null;
		$.ajax({
			   type: "POST",
			   async:false,// 同步的
			   timeout: this.timeout, 
			   hearders:{"Referer":"http://localhost:7896/bbs/upload/member.php?mod=register"},
			   url: url,
			   contentType:'multipart/form-data; boundary=----WebKitFormBoundary5MglsIkhmIHmrLDm',
			   data: data,
			   success: function(resv){
				   resposne = resv;
			   }
		});
		return resposne;
	};
	
	
	this.getAsync = function(url,data){
		var resposne = null;
		$.ajax({
			   type: "GET",
			   async:true,// 异步的
			   timeout: this.timeout,
			   url: url,
			   data: data,
			   success: function(resv){
				   resposne = resv;
			   }
		});
		return resposne;
	};
	this.postUnAsync = function(url,data){
		var resposne = null;
		$.ajax({
			   type: "POST",
			   async:false,// 同步的
			   timeout: this.timeout,
			   url: url,
			   data: data,
			   success: function(resv){
				   resposne = resv;
			   }
		});
		return resposne;
	};
	this.postAsync = function(url,data){
		var resposne = null;
		$.ajax({
			   type: "POST",
			   async:true,// 异步的
			   timeout: this.timeout,
			   url: url,
			   data: data,
			   success: function(resv){
				   resposne = resv;
			   }
		});
		return resposne;
	};
};
